package com.itheima.charstream1;

import java.io.FileReader;
import java.io.IOException;

public class CharStreamDemo7 {
    public static void main(String[] args) throws IOException {
        FileReader fr = new FileReader("CharStream\\a.txt");

        char[] contents = new char[1024];
        int len;
        while ((len = fr.read(contents)) != -1) {
            System.out.println(new String(contents, 0, len));
        }

        fr.close();
    }
}
